
{include file="login/style" /}
<div class="layui-container fly-marginTop">
  <div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title">
        <li><a href="{:__u('login/index')}">登入</a></li>
        <li class="layui-this">找回密码<!--重置密码--></li>
      </ul>
      <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
        <div class="layui-tab-item layui-show">
          <!-- 重置密码 -->
          {if cookie('forget_uid') && cookie('forget_code')}
          <div class="fly-msg">{:_getMember(cookie('forget_uid'))['username']}，请重置您的密码 <a href="{:__u('login/forget',['type'=>1])}"> 没收到邮件？点击重新发送</a></div>
          <div class="layui-form"  style="padding:20px 0;">
            <form action="{:__u('repass')}" method="post">
              <div class="layui-form-item">
                <div class="layui-input-block">
                  <label for="L_pass" class="layui-form-label">密码</label>
                  <input type="password" id="L_pass" placeholder="6到16个字符" name="password" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
              </div>
              <div class="layui-form-item">
                <div class="layui-input-block">
                  <label for="L_repass" class="layui-form-label">确认密码</label>
                  <input type="password" id="L_repass" name="repassword" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
              </div>
              <div class="layui-form-item">
                <div class="layui-input-block">
                  <label for="L_vercode" class="layui-form-label">验证码</label>
                  <input type="text" id="L_vercode" name="vercode" required lay-verify="required" placeholder="请输入邮箱验证码" autocomplete="off" class="layui-input">
                </div>
<!--                <div class="layui-form-mid" style="padding: 0!important;">-->
<!--                  <span style="color: #c00;">-->
<!--                    <img  id="captchaPic" src="{:__u('verify')}?{:time()}" alt="验证码" onclick="this.src='{:__u("verify")}?'+'id='+Math.random()" style="height: 36px;border: 1px solid #ececec;"/>-->
<!--                  </span>-->
<!--                </div>-->
              </div>
              {:token_field('__token__')}
              <div class="layui-form-item">
                <input type="hidden" name="id" value="{:cookie('forget_uid')}">
                <input type="hidden" name="email" value="{:cookie('email')}">
                <button class="layui-btn"  data-request="{:__u('repass')}" lay-filter="*" lay-submit>提交</button>
              </div>
            </form>
          </div>
          {if cookie('forget_uid') && !cookie('forget_code')}
          <div class="fly-error">该重置密码链接已失效，请重新校验您的信息</div>
          <div class="fly-error">非法链接，请重新校验您的信息</div>
          {/if}
          {else/}
          <div class="layui-form"  style="padding:20px 0;">
            <form method="post">
              <div class="layui-form-item">
                <div class="layui-input-block">
                  <label for="L_email" class="layui-form-label">邮箱</label>
                  <input type="text" id="L_email" name="email" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
              </div>
              <div class="layui-form-item">
                <div class="layui-input-block">
                  <label for="L_vercode" class="layui-form-label">验证码</label>
                  <input type="text" id="L_vercode" name="vercode" required lay-verify="required" placeholder="请输入答案" autocomplete="off" class="layui-input vercode">
                  <div class="layui-form-mid" style="padding: 0!important;">
                  <span style="color: #c00;">
                    <img style="height: 36px;border: 1px solid #ececec;" id="captchaPic" src="{:__u('index/verify',['t'=>time()])}" alt="验证码" onclick="this.src='{:__u("index/verify")}'+'?t='+Math.random()" />
                  </span>
                  </div>
                </div>

              </div>
              {:token_field('__token__', 'sha1')}
              <div class="layui-form-item">
                <button class="layui-btn"  lay-filter="*" lay-submit>提交</button>
              </div>
            </form>
          </div>
          {/if}
          
        </div>
      </div>
    </div>
  </div>

  
</div>

